package cn.kgc.controller;

import cn.kgc.client.HystrixClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/6/29
 * @Description:
 */
@RestController
@RequestMapping("hystrix")
public class HystrixController {

    @Autowired
    private HystrixClient hystrixClient;
    @RequestMapping("m1")
    public String method(Integer id){
        String info = hystrixClient.getById(id);
        return info;
    }
}
